import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

/**
 * 
 */

/**
 * @author caspert
 * 
 */
public class OperandEvaluatorTest {

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		SymbolTable.addSymbol("AA");
		SymbolTable.editLocationAddress("AA", "4");
		SymbolTable.editUsage("AA", "EQU");
		SymbolTable.editEQUValue("AA", "5");

		SymbolTable.addSymbol("BB");
		SymbolTable.editLocationAddress("BB", "10");
		SymbolTable.editUsage("BB", "EQU");
		SymbolTable.editEQUValue("BB", "100");

		SymbolTable.addSymbol("CC");
		SymbolTable.editLocationAddress("CC", "20");
		SymbolTable.editUsage("CC", "EQU");
		SymbolTable.editEQUValue("CC", "25");

		SymbolTable.addSymbol("=10");
		SymbolTable.editLocationAddress("=10", "25");
		SymbolTable.editUsage("=10", "LITERAL AND GARBAGE");
		SymbolTable.editEQUValue("=10", "10");

		SymbolTable.addSymbol("='ABC'");
		SymbolTable.editLocationAddress("='ABC'", "80");
		SymbolTable.editUsage("='ABC'", "LITERAL");
		SymbolTable.editEQUValue("='ABC'", "4276803");

		SymbolTable.addSymbol("mud");
		SymbolTable.editLocationAddress("mud", "55");
		SymbolTable.editUsage("mud", "Instruction Label");

		SymbolTable.addSymbol("dirt");
		SymbolTable.editLocationAddress("dirt", "125");
		SymbolTable.editUsage("dirt", "LABEL");

		SymbolTable.addSymbol("grass");
		SymbolTable.editLocationAddress("grass", "75");
		SymbolTable.editUsage("grass", "LABEL AND GARBAGE");

		SymbolTable.addSymbol("external_label");
		SymbolTable.editLocationAddress("external_label", "n/a");
		SymbolTable.editLength("external_label", "n/a");
		SymbolTable.editUsage("external_label", "EXTERNAL LABEL");
		
		IntermediateFile.startIntermediateFile();
		
		// test evaluateOperand case 0
		IntermediateFile.addLocationCounter(0);
		IntermediateFile.addOperation("START");
		IntermediateFile.addFullOperand("0");
		
		// test evaluateOperand case 1
		IntermediateFile.addLocationCounter(0);
		IntermediateFile.addOperation("LD-AC");
		IntermediateFile.addFullOperand("dirt");
		
		// test evaluateOperand case 2
		IntermediateFile.addLocationCounter(1);
		IntermediateFile.addOperation("ST-AC");
		IntermediateFile.addFullOperand("external_label");
		
		// test evaluateOperand case 3
		IntermediateFile.addLocationCounter(2);
		IntermediateFile.addOperation("LD-IR");
		IntermediateFile.addFullOperand("BB,IR");
		
		// test evaluateOperand case 4
		IntermediateFile.addLocationCounter(3);
		IntermediateFile.addOperation("ST-IR");
		IntermediateFile.addFullOperand("**10");
		
		// test evaluateOperand case 5
		IntermediateFile.addLocationCounter(4);
		IntermediateFile.addOperation("LD-AR");
		IntermediateFile.addFullOperand("*/2");
		
		// test evaluateOperand case 6
		IntermediateFile.addLocationCounter(5);
		IntermediateFile.addOperation("ST-AR");
		IntermediateFile.addFullOperand("*+=10");
		
		// test evaluateOperand case 7
		IntermediateFile.addLocationCounter(6);
		IntermediateFile.addOperation("LD-BR");
		IntermediateFile.addFullOperand("*-1");
		
		// test evaluateOperand case 8
		IntermediateFile.addLocationCounter(7);
		IntermediateFile.addOperation("ADD-AC");
		IntermediateFile.addFullOperand("-AA");
		
		// test evaluateOperand case 9
		IntermediateFile.addLocationCounter(8);
		IntermediateFile.addOperation("EQU-exp");
		IntermediateFile.addFullOperand("60+BB/AA-20");
		
		// test evaluateOperand case 10
		IntermediateFile.addLocationCounter(9);
		IntermediateFile.addOperation("WORD-BIN");
		IntermediateFile.addFullOperand("101110001");
		
		// test evaluateOperand case 11
		IntermediateFile.addLocationCounter(10);
		IntermediateFile.addOperation("WORD-HEX");
		IntermediateFile.addFullOperand("0xAB18");
		
		// test evaluateOperand case 12
		IntermediateFile.addLocationCounter(11);
		IntermediateFile.addOperation("WORD-CHR");
		IntermediateFile.addFullOperand("'5j'");
		
		// test evaluateOperand case 13
		IntermediateFile.addLocationCounter(12);
		IntermediateFile.addOperation("ADR");
		IntermediateFile.addFullOperand("grass");
		
		// test evaluateOperand case 14
		IntermediateFile.addLocationCounter(13);
		IntermediateFile.addOperation("ADR-comp");
		IntermediateFile.addFullOperand("dirt+grass-mud");
		
		// test evaluateOperand case 15
		IntermediateFile.addLocationCounter(14);
		IntermediateFile.addOperation("ADR-comp");
		IntermediateFile.addFullOperand("dirt+grass-mud+external_label");
		
		// test evaluateOperand case 16
		IntermediateFile.addLocationCounter(15);
		IntermediateFile.addOperation("ADR");
		IntermediateFile.addFullOperand("%mud");
		
		// test evaluateOperand case 17
		IntermediateFile.addLocationCounter(16);
		IntermediateFile.addOperation("ADR");
		IntermediateFile.addFullOperand("#mud");
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 0 (see setUp)
	 */
	@Test
	public void testEvaluateCaseStart0() {
		int expected = 0;
		int actual = OperandEvaluator.evaluateOperand(0);

		assertEquals("0 should evaluate to 0", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 1 (see setUp)
	 */
	@Test
	public void testEvaluateCaseLabel() {
		int expected = 125;
		int actual = OperandEvaluator.evaluateOperand(1);

		assertEquals("dirt should evaluate to 125", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 2 (see setUp)
	 */
	@Test
	public void testEvaluateCaseExternalLabel() {
		int expected = 0;
		int actual = OperandEvaluator.evaluateOperand(2);

		assertEquals("external_label should evaluate to 0 (because it is external)", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 3 (see setUp)
	 */
	@Test
	public void testEvaluateCaseEQU() {
		int expected = 100;
		int actual = OperandEvaluator.evaluateOperand(3);

		assertEquals("BB should evaluate to 100", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 4 (see setUp)
	 */
	@Test
	public void testEvaluateCaseStarTimesConstant() {
		int expected = 30;
		int actual = OperandEvaluator.evaluateOperand(4);
		assertEquals("**10 should evaluate to 30 when LC = 3", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 5 (see setUp)
	 */
	@Test
	public void testEvaluateCaseStarDivideConstant() {
		int expected = 2;
		int actual = OperandEvaluator.evaluateOperand(5);
		assertEquals("*/2 should evaluate to 2 when LC = 4", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 6 (see setUp)
	 */
	@Test
	public void testEvaluateCaseStarPlusConstant() {
		int expected = 15;
		int actual = OperandEvaluator.evaluateOperand(6);
		assertEquals("*+10 should evaluate to 15 when LC = 5", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 7 (see setUp)
	 */
	@Test
	public void testEvaluateCaseStarMinusConstant() {
		int expected = 5;
		int actual = OperandEvaluator.evaluateOperand(7);
		assertEquals("*-1 should evaluate to 5 when LC = 6", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 8 (see setUp)
	 */
	@Test
	public void testEvaluateCaseNegativeEQU() {
		int expected = -5;
		int actual = OperandEvaluator.evaluateOperand(8);
		assertEquals("-AA should evaluate to -5", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 9 (see setUp)
	 */
	@Test
	public void testEvaluateCaseEquExp() {
		int expected = 60 + 100 / 5 - 20;
		int actual = OperandEvaluator.evaluateOperand(9);
		assertEquals("60+BB/AA-20 should evaluate to 60", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 10 (see setUp)
	 */
	@Test
	public void testEvaluateCaseWordBin() {
		int expected = Integer.parseInt("101110001",2);
		int actual = OperandEvaluator.evaluateOperand(10);
		assertEquals("101110001 should evaluate to 369", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 11 (see setUp)
	 */
	@Test
	public void testEvaluateCaseWordHex() {
		int expected = Integer.parseInt("AB18",16);
		int actual = OperandEvaluator.evaluateOperand(11);
		assertEquals("AB18 should evaluate to 43800", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 12 (see setUp)
	 */
	@Test
	public void testEvaluateCaseWordChr() {
		// 5 = 0x35
		// j = 0x6A
		// space = 0x20 <-- because CHR is left justified
		// '5j' = 0x356A20
		int expected = Integer.parseInt("356A20",16);
		int actual = OperandEvaluator.evaluateOperand(12);
		assertEquals("'5j' should evaluate to 3500576", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 13 (see setUp)
	 */
	@Test
	public void testEvaluateCaseAdrLabel() {
		int expected = 75;
		int actual = OperandEvaluator.evaluateOperand(13);
		assertEquals("grass should evaluate to 75 (its address)", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 14 (see setUp)
	 */
	@Test
	public void testEvaluateCaseAdrComp() {
		int expected = 125 + 75 - 55;
		int actual = OperandEvaluator.evaluateOperand(14);
		assertEquals("dirt+grass-grass should evaluate to 145 (sum of addresses)", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 15 (see setUp)
	 */
	@Test
	public void testEvaluateCaseAddrCompExternalReference() {
		int expected = 0;
		int actual = OperandEvaluator.evaluateOperand(15);
		assertEquals("dirt+grass-mud+external_label should evaluate to 0 (due to external reference)", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 15 (see setUp)
	 */
	@Test
	public void testEvaluateCaseIndirectReference() {
		int expected = 55;
		int actual = OperandEvaluator.evaluateOperand(16);
		assertEquals("%mud should evaluate to the address of mud (55)", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests case 15 (see setUp)
	 */
	@Test
	public void testEvaluateCaseDirectReference() {
		int expected = 55;
		int actual = OperandEvaluator.evaluateOperand(17);
		assertEquals("#mud should evaluate to the address of mud (55)", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single number
	 */
	@Test
	public void testEvaluateExpressionSingleNumber() {
		String[] testArray = new String[6];
		testArray[0] = "5";
		
		int expected = 5;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("5 should evaluate to 5", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single number
	 */
	@Test
	public void testEvaluateExpressionNegativeNumber() {
		String[] testArray = new String[6];
		testArray[0] = "-5";
		
		int expected = -5;
		int actual = OperandEvaluator.evalutateExpression(testArray);
		assertEquals("-5 should evaluate to -5", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionSingleEQU() {
		String[] testArray = new String[6];
		testArray[0] = "AA";
		
		int expected = 5;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("AA should evaluate to 5", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionNegativeEQU() {
		String[] testArray = new String[6];
		testArray[0] = "-AA";
		
		int expected = -5;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("-AA should evaluate to -5", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionSingleLabel() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		
		int expected = 55;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("mud should evaluate to 55", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionNegativeLabel() {
		String[] testArray = new String[6];
		testArray[0] = "-mud";
		
		int expected = -55;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("-mud should evaluate to -55", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "=10";
		
		int expected = 10;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("=10 should evaluate to 10", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionNegativeLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "-=10";
		
		int expected = -10;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("-=10 should evaluate to -10", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = "='ABC'";
		
		int expected = Integer.parseInt("414243", 16);
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("='ABC' should evaluate to 4276803", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testEvaluateExpressionNegativeLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = "-='ABC'";
		
		int expected = Integer.parseInt("414243", 16) * -1;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("-='ABC' should evaluate to -4276803", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with the IR turned on
	 */
	@Test
	public void testEvaluateExpressionIR() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray[1] = "IR";
		
		int expected = 55;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("mud should evaluate to 55", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with only addition and subtraction
	 */
	@Test
	public void testEvaluateExpressionAdditionSubtractionOnly() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray[1] = "+AA";
		testArray[2] = "+45";
		testArray[3] = "-15";
		testArray[4] = "-grass";
		testArray[5] = "+BB";
		
		int expected = 115;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("mud+AA+45-15-grass+BB should evaluate to 115", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with only multiplication and division
	 */
	@Test
	public void testEvaluateExpressionMultiplicationDivisionOnly() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray[1] = "*AA";
		testArray[2] = "/5";
		testArray[3] = "*10";
		testArray[4] = "/grass";
		testArray[5] = "*BB";
		
		int expected = 700;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("mud*AA/5*10/grass*BB should evaluate to 700", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a complicated expression
	 */
	@Test
	public void testEvaluateExpressionComplicated() {
		String[] testArray = new String[6];
		testArray[0] = "-mud";
		testArray[1] = "*AA";
		testArray[2] = "+5";
		testArray[3] = "*30";
		testArray[4] = "/grass";
		testArray[5] = "-BB";
		
		int expected = -275 + 2 - 100;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("-mud*AA+5*10/grass-BB should evaluate to -373", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a complex (external) label
	 */
	@Test
	public void testEvaluateExpressionExternal() {
		String[] testArray = new String[6];
		testArray[0] = "external_label";
		
		int expected = 0;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("external_label should be 0 because it contains an external", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a complex (external) label
	 */
	@Test
	public void testEvaluateExpressionNegativeExternal() {
		String[] testArray = new String[6];
		testArray[0] = "-external_label";
		
		int expected = 0;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("-external_label should be 0 because it contains an external", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a complex (external) expression
	 */
	@Test
	public void testEvaluateExpressionComplexExternal() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray[1] = "+AA";
		testArray[2] = "+5";
		testArray[3] = "-30";
		testArray[4] = "-external_label";
		testArray[5] = "+BB";
		
		int expected = 0;
		int actual = OperandEvaluator.evalutateExpression(testArray);

		assertEquals("mud*AA+5*10/grass-BB should be 0 because it contains an external", expected, actual);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single number
	 */
	@Test
	public void testDoMultiplicationNumber() {
		String[] testArray = new String[6];
		testArray[0] = "5";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 5", "5", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testDoMultiplicationEQU() {
		String[] testArray = new String[6];
		testArray[0] = "BB";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be BB", "BB", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a single EQU
	 */
	@Test
	public void testDoMultiplicationLabel() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be mud", "mud", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a literal number
	 */
	@Test
	public void testDoMultiplicationLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "=10";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be =10", "=10", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a literal number
	 */
	@Test
	public void testDoMultiplicationLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = "='ABC'";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be ='ABC'", "='ABC'", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a literal number
	 */
	@Test
	public void testDoMultiplicationNumberTimesLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "75";
		testArray[1] = "*=10";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 750", "750", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a literal number
	 */
	@Test
	public void testDoMultiplicationNumberDivideLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "50";
		testArray[1] = "/=10";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 5", "5", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a literal number
	 */
	@Test
	public void testDoMultiplicationNumberTimesLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = "10";
		testArray[1] = "*='ABC'";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 42768030", "42768030", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a literal number
	 */
	@Test
	public void testDoMultiplicationNumberDivideLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = Integer.toString(4276803*2);
		testArray[1] = "/='ABC'";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 2", "2", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with the IR on
	 */
	@Test
	public void testDoMultiplicationIR() {
		String[] testArray = new String[6];
		testArray[0] = "AA";
		testArray[1] = "IR";
		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be AA", "AA", testArray[0]);
		assertEquals("Position 1 should be IR", "IR", testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a simple number
	 * expression
	 */
	@Test
	public void testDoMultiplicationSimpleNumbers() {
		String[] testArray = new String[6];
		testArray[0] = "5";
		testArray[1] = "+10";
		testArray[2] = "*10";
		testArray[3] = "-3";

		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 5", "5", testArray[0]);
		assertEquals("Position 1 should be +100", "+100", testArray[1]);
		assertEquals("Position 2 should be -3", "-3", testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a complex number
	 * expression
	 */
	@Test
	public void testDoMultiplicationComplicatedNumbers() {
		String[] testArray = new String[6];
		testArray[0] = "-1000";
		testArray[1] = "/10";
		testArray[2] = "+25";
		testArray[3] = "*20";
		testArray[4] = "-6";
		testArray[5] = "*34";

		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be -100", "-100", testArray[0]);
		assertEquals("Position 1 should be +500", "+500", testArray[1]);
		assertEquals("Position 2 should be -204", "-204", testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a simple EQU'd symbol expression
	 */
	@Test
	public void testDoMultiplicationSimpleEQUs() {
		String[] testArray = new String[6];
		testArray[0] = "AA";
		testArray[1] = "+BB";
		testArray[2] = "*CC";
		testArray[3] = "-CC";

		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be AA", "AA", testArray[0]);
		assertEquals("Position 1 should be +2500", "+2500", testArray[1]);
		assertEquals("Position 2 should be -CC", "-CC", testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with a complex EQU'd symbol expression
	 */
	@Test
	public void testDoMultiplicationComplicatedEQUs() {
		String[] testArray = new String[6];
		testArray[0] = "-BB";
		testArray[1] = "/AA";
		testArray[2] = "*CC";
		testArray[3] = "-CC";
		testArray[4] = "/AA";
		testArray[5] = "*BB";

		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be -500", "-500", testArray[0]);
		assertEquals("Position 1 should be -500", "-500", testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with 
	 */
	@Test
	public void testDoMultiplicationSimpleNumbersAndEQU() {
		String[] testArray = new String[6];
		testArray[0] = "942";
		testArray[1] = "+BB";
		testArray[2] = "/5";
		testArray[3] = "-CC";

		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 942", "942", testArray[0]);
		assertEquals("Position 1 should be +20", "+20", testArray[1]);
		assertEquals("Position 2 should be -CC", "-CC", testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doMultiplicationAndDivision module with 
	 */
	@Test
	public void testDoMultiplicationComplicatedNumbersAndEQU() {
		String[] testArray = new String[6];
		testArray[0] = "25";
		testArray[1] = "/AA";
		testArray[2] = "*15";
		testArray[3] = "+175";
		testArray[4] = "/CC";
		testArray[5] = "*BB";

		testArray = OperandEvaluator.doMultiplicationAndDivision(testArray);

		assertEquals("Position 0 should be 75", "75", testArray[0]);
		assertEquals("Position 1 should be +700", "+700", testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a single number
	 */
	@Test
	public void testDoAdditionNumber() {
		String[] testArray = new String[6];
		testArray[0] = "5";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 5", "5", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a single EQU
	 */
	@Test
	public void testDoAdditionEQU() {
		String[] testArray = new String[6];
		testArray[0] = "BB";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be BB", "BB", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a single EQU
	 */
	@Test
	public void testDoAdditionLabel() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be mud", "mud", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a literal number
	 */
	@Test
	public void testDoAdditionLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "=10";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be =10", "=10", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubstraction module with a literal number
	 */
	@Test
	public void testDoAdditionLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = "='ABC'";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be ='ABC'", "='ABC'", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a literal number
	 */
	@Test
	public void testDoAdditionNumberPlusLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "75";
		testArray[1] = "+=10";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 85", "85", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a literal number
	 */
	@Test
	public void testDoAdditionNumberMinusLiteralNumber() {
		String[] testArray = new String[6];
		testArray[0] = "50";
		testArray[1] = "-=10";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 40", "40", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a literal number
	 */
	@Test
	public void testDoAdditionNumberPlusLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = "10";
		testArray[1] = "+='ABC'";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 4276813", "4276813", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a literal number
	 */
	@Test
	public void testDoAdditionNumberMinusLiteralCharString() {
		String[] testArray = new String[6];
		testArray[0] = "4276810";
		testArray[1] = "-='ABC'";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 7", "7", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubstraction module with the IR on
	 */
	@Test
	public void testDoAdditionIR() {
		String[] testArray = new String[6];
		testArray[0] = "AA";
		testArray[1] = "IR";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be AA", "AA", testArray[0]);
		assertEquals("Position 1 should be IR", "IR", testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a simple number
	 * expression
	 */
	@Test
	public void testDoAdditionSimpleNumbers() {
		String[] testArray = new String[6];
		testArray[0] = "5";
		testArray[1] = "+10";
		testArray[2] = "-3";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 12", "12", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a complex number
	 * expression
	 */
	@Test
	public void testDoAdditionComplicatedNumbers() {
		String[] testArray = new String[6];
		testArray[0] = "-1000";
		testArray[1] = "+10";
		testArray[2] = "+25";
		testArray[3] = "-20";
		testArray[4] = "-6";
		testArray[5] = "+34";
		
		String answer = Integer.toString(-1000+10+25-20-6+34);

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);
		assertEquals("Position 0 should be -957", answer, testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a simple EQU'd symbol expression
	 */
	@Test
	public void testDoAdditionSimpleEQUs() {
		String[] testArray = new String[6];
		testArray[0] = "AA";
		testArray[1] = "+BB";
		testArray[2] = "+CC";
		testArray[3] = "-CC";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 105", "105", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a complex EQU'd symbol expression
	 */
	@Test
	public void testDoAdditionComplicatedEQUs() {
		String[] testArray = new String[6];
		testArray[0] = "-BB";
		testArray[1] = "-AA";
		testArray[2] = "+CC";
		testArray[3] = "+CC";
		testArray[4] = "+AA";
		testArray[5] = "-BB";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);
		assertEquals("Position 0 should be -150", "-150", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with 
	 */
	@Test
	public void testDoAdditionSimpleNumbersAndEQU() {
		String[] testArray = new String[6];
		testArray[0] = "942";
		testArray[1] = "+BB";
		testArray[2] = "-5";
		testArray[3] = "-CC";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 1012", "1012", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with 
	 */
	@Test
	public void testDoAdditionComplicatedNumbersAndEQU() {
		String[] testArray = new String[6];
		testArray[0] = "25";
		testArray[1] = "+AA";
		testArray[2] = "+15";
		testArray[3] = "-175";
		testArray[4] = "-CC";
		testArray[5] = "+BB";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);
		assertEquals("Position 0 should be -55", "-55", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a simple label
	 * expression
	 */
	@Test
	public void testDoAdditionSimpleLabels() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray[1] = "+dirt";
		testArray[2] = "-grass";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 105", "105", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a complex label
	 * expression
	 */
	@Test
	public void testDoAdditionComplicatedLabels() {
		String[] testArray = new String[6];
		testArray[0] = "-dirt";
		testArray[1] = "+grass";
		testArray[2] = "+mud";
		testArray[3] = "-dirt";
		testArray[4] = "-mud";
		testArray[5] = "+mud";
		
		String answer = Integer.toString(-125+75+55-125-55+55);
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);
		assertEquals("Position 0 should be -120", answer, testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a simple EQU'd symbol expression
	 */
	@Test
	public void testDoAdditionSimpleEQUsAndLabels() {
		String[] testArray = new String[6];
		testArray[0] = "mud";
		testArray[1] = "+BB";
		testArray[2] = "+dirt";
		testArray[3] = "-grass";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);
		assertEquals("Position 0 should be 205", "205", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with a complex EQU'd symbol expression
	 */
	@Test
	public void testDoAdditionComplicatedEQUsAndLabels() {
		String[] testArray = new String[6];
		testArray[0] = "-BB";
		testArray[1] = "-grass";
		testArray[2] = "+CC";
		testArray[3] = "+mud";
		testArray[4] = "+AA";
		testArray[5] = "-dirt";
		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);
		String answer = Integer.toString(-100-75+25+55+5-125);
		assertEquals("Position 0 should be -215", answer, testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with 
	 */
	@Test
	public void testDoAdditionSimpleNumbersAndEQUAndLabels() {
		String[] testArray = new String[6];
		testArray[0] = "250";
		testArray[1] = "+BB";
		testArray[2] = "-mud";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);

		assertEquals("Position 0 should be 295", "295", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the doAdditionAndSubtraction module with 
	 */
	@Test
	public void testDoAdditionComplicatedNumbersAndEQUAndLabels() {
		String[] testArray = new String[6];
		testArray[0] = "25";
		testArray[1] = "+AA";
		testArray[2] = "+mud";
		testArray[3] = "-15";
		testArray[4] = "-CC";
		testArray[5] = "+grass";

		testArray = OperandEvaluator.doAdditionAndSubtraction(testArray);
		assertEquals("Position 0 should be 120", "120", testArray[0]);
		assertEquals("Position 1 should be null", null, testArray[1]);
		assertEquals("Position 2 should be null", null, testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}
	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the moveArrayForward module with a not full array and a
	 * middle position
	 */
	@Test
	public void testRemoveArrayItemFullArrayFullArrayMiddlePos() {
		String[] testArray = new String[6];
		testArray[0] = "70";
		testArray[1] = "+AA";
		testArray[2] = "*BB";
		testArray[3] = "-CC";
		int pos = 1;

		testArray = OperandEvaluator.removeArrayItem(pos, testArray);

		assertEquals("Position 0 should be 70", "70", testArray[0]);
		assertEquals("Position 1 should be *BB", "*BB", testArray[1]);
		assertEquals("Position 2 should be -CC", "-CC", testArray[2]);
		assertEquals("Position 3 should be null", null, testArray[3]);
		assertEquals("Position 4 should be null", null, testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the moveArrayForward module with a full array and an end
	 * position
	 */
	@Test
	public void testRemoveArrayItemFullArrayFullArrayEndPos() {
		String[] testArray = new String[6];
		testArray[0] = "70";
		testArray[1] = "+AA";
		testArray[2] = "*BB";
		testArray[3] = "-CC";
		testArray[4] = "-745";
		testArray[5] = "+123";
		int pos = 5;

		testArray = OperandEvaluator.removeArrayItem(pos, testArray);

		assertEquals("Position 0 should be 70", "70", testArray[0]);
		assertEquals("Position 1 should be +AA", "+AA", testArray[1]);
		assertEquals("Position 2 should be *BB", "*BB", testArray[2]);
		assertEquals("Position 3 should be -CC", "-CC", testArray[3]);
		assertEquals("Position 4 should be -745", "-745", testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the moveArrayForward module with a full array and a middle
	 * position
	 */
	@Test
	public void testRemoveArrayItemFullArrayMiddlePos() {
		String[] testArray = new String[6];
		testArray[0] = "70";
		testArray[1] = "+AA";
		testArray[2] = "*BB";
		testArray[3] = "-CC";
		testArray[4] = "-745";
		testArray[5] = "+123";
		int pos = 3;

		testArray = OperandEvaluator.removeArrayItem(pos, testArray);

		assertEquals("Position 0 should be 70", "70", testArray[0]);
		assertEquals("Position 1 should be +AA", "+AA", testArray[1]);
		assertEquals("Position 2 should be *BB", "*BB", testArray[2]);
		assertEquals("Position 3 should be -745", "-745", testArray[3]);
		assertEquals("Position 4 should be +123", "+123", testArray[4]);
		assertEquals("Position 5 should be null", null, testArray[5]);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of a literal value
	 */
	@Test
	public void testGetOperandValueNumber() {
		String symbol = "552";
		int expected = 552;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals("Result should be the number", expected, actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of a literal value
	 */
	@Test
	public void testGetOperandValueExternal() {
		String symbol = "external_label";
		int expected = -999999999;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals(
				"Result should be the external label flag (\"-999999999\"",
				expected, actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of a literal value
	 */
	@Test
	public void testGetOperandValueLiteralValue() {
		String symbol = "=10";
		int expected = 10;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals("Result should equal to the literal value", expected,
				actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of a literal value
	 */
	@Test
	public void testGetOperandValueLiteralCHRString() {
		String symbol = "='ABC'";
		int expected = 4276803;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals(
				"Result should equal the decimal value of hex string of each character's ascii value",
				expected, actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of a label
	 */
	@Test
	public void testGetOperandValueLABELANDGARBAGE() {
		String symbol = "grass";
		int expected = 75;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals("Result should equal to the address of the label",
				expected, actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of a label
	 */
	@Test
	public void testGetOperandValueLABEL() {
		String symbol = "dirt";
		int expected = 125;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals("Result should equal to the address of the label",
				expected, actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of a label
	 */
	@Test
	public void testGetOperandValueInstructionLabel() {
		String symbol = "mud";
		int expected = 55;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals("Result should equal to the address of the label",
				expected, actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests getting the operand value of an equated symbol
	 */
	@Test
	public void testGetOperandValueEquatedSymbol() {
		String symbol = "AA";
		int expected = 5;
		int actual = OperandEvaluator.getOperandValue(symbol);
		assertEquals("Result should equal to the EQU value of the symbol",
				expected, actual);
	}

	/**
	 * Test method for {@link OperandEvaluator#evaluate(java.lang.String)} This
	 * module tests the evaluation of a character string
	 */
	@Test
	public void testEvaluateCHRString() {
		String charString = "ABC";
		int expected = 4276803;
		int actual = OperandEvaluator.evaluateCHRString(charString);
		assertEquals(
				"Result should equal the decimal value of hex string of each character's ascii value",
				expected, actual);
	}
}
